home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / sharew / musik / diti_tra.ck / dt_modul.eng / dt_defin.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-30  |  4.6 KB  |  158 lines

  1. /* Defines and structures for DigiTape Module */
  2. /* last change 1.7.93 */
  3.  
  4. #define DTM_VERSION 'DTM1'
  5.  
  6. /*-------------------------------------------------------------------- 
  7. Messages to the modules with: 
  8.  
  9. procedure( int module_action,        see following defines
  10.                      Glob_globals *glob,    pointer to System-Globals
  11.                      int x,
  12.                      int y,
  13.                      int param        MOD_INIT: TRUE=recording on
  14.                  )
  15.  
  16. if the module doesn't want to process the message, it returns FALSE
  17. ----------------------------------------------------------------------*/
  18.  
  19. #define MOD_RSC_INIT               1        /* comes during loadtime*/
  20. #define MOD_INIT                        2        /* during initialisation
  21.                                    param: TRUE if Mastermodul is set to record */
  22. #define MOD_DRAW                        3        /* before drawing */
  23.  
  24. #define MOD_LOAD_DSP                4        /* load DSP programm
  25.                                                                      x: DSP-input variable (mono)
  26.                                                                      y: output variable (mono)
  27.                                                                      param: address of buffer (Echo etc.)*/
  28. #define MOD_CLR_MEMORY            5        /* clear DSP buffer */
  29.  
  30. #define MOD_LBUTTONDOWN            6        /* left mouse button down
  31.                                                                      x, y: mouse position */
  32. #define MOD_MOUSEMOVE                7        /* mouse dragged (button pressed)
  33.                                                                      x, y: Mausposition */
  34. #define MOD_LBUTTONUP                8        /* left button released */
  35. #define MOD_OUT_VOLS                9        /* send slider (etc) settings to DSP */
  36.  
  37. #define MOD_SLIDER_MOVED      10        /* slider moved:
  38.                                                                      x: slider id (-2: Vol, -1: Pan )
  39.                                                                      y: position from 0 to 255 */
  40. #define MOD_BUTTON_CHANGED 11        /* button toggled
  41.                                                                      x: object index */
  42. #define MOD_DEL_EFFECT         12        /* nicht für externe Module */
  43.  
  44. #define MOD_GET_VERSION        999        /* return version number*/
  45.  
  46.  
  47. /* Bits für 'type' in Module_info */
  48. #define STEREO_IN  2
  49. #define STEREO_OUT 1
  50.  
  51. /* Modulbeschreibung */
  52. typedef struct
  53. {
  54.     int type;
  55.  
  56.     int x6, x8, x15, xbuff_size;          /* DSP memory need*/
  57.     int y6, y8, y15, ybuff_size;
  58.  
  59.     char *mcomment;       /* descriptive text, displayed in the 'Auswahl'-menu */
  60. } Module_info;
  61.  
  62. /* oject indexes in the resource */
  63. typedef struct
  64. {
  65.     int tree_index;
  66.     int titel_index;    /* module title */
  67.     int solo_index;
  68.     int eject_index;
  69.     int mute_index;
  70.     int vol_parent;  /* parent to the volume-slider handle */
  71.     int vol_slider;     /* slider. always vertical! */
  72.     int pan_parent;  /* always horizontal */
  73.     int pan_slider;
  74. } Rsc_info;
  75.  
  76.  
  77. typedef struct
  78. {
  79.     int bitplanes;
  80.     int nr_effekte;
  81.  
  82.     long    Hz;         /* current frequency. */
  83.     long    tape_Hz;
  84.     long    reserve[4];    
  85.  
  86.     void    *track_info; /* pointer to array */
  87.     void    *free[7];
  88.  
  89.     void (*_dtm_init)( Module_info *dtm_info,
  90.                                          void *rsc, Rsc_info *rsc_info);
  91.     int        (*_dtm_init_poti)(void *vglob, int potinr, int type,
  92.                                                     int parent, int slider, int value);
  93.  
  94.     int        (*_mrsc_load)(void *rsc_hdr);
  95.     long    *(*_log_tab_entry)( int wert );
  96.     long    (*_get_rsc_pegel)( int f_size, int s_size, int s_posi,
  97.                                                     long max, int vertikal );
  98.     void (*_set_line_volume)( int button, int vol, int line_nr );
  99.     void (*_set_line_panorama)( int button, int pan, int line_nr );
  100.  
  101.     int  (*_DialogState)(HDIALOG hdialog, int item, int set, int mask);
  102.     int  (*_DialogFlags)(HDIALOG hdialog, int item, int set, int mask);
  103.     int  (*_DialogPrintf)(HDIALOG hdialog, int item, char *format, ...);
  104.  
  105.     void (*_draw_object)( OBJECT *obj, int item );
  106.     int  (*_object_find)( OBJECT *baum, int beg_obj, int depth, int x, int y );
  107.  
  108.     void (*_dm_setvar)(int memtype, int var, long *value, int size);
  109.     int  (*_dm_defvar)(int typ, int adrsize, int size);
  110.     int  cdecl (*_dm_load)(void *modul, ...);
  111.     void (*_dsp_setblock)( int memtyp, int adr, long value, int size);
  112. } System_globals;
  113.  
  114. typedef struct
  115. {
  116.     int line_nr;  /* 0-7: Tracks, 8-15: effects */
  117.     int slot_nr;
  118.     OBJECT *object_ptr;
  119.     HDIALOG hdialog;
  120.  
  121.     System_globals *sys;
  122.     Module_info *mhinfo;
  123.  
  124.     int    track_nr;  /* for Track-Modules */
  125.     int    track_nr2; /* 2. Kanal for Stereo */
  126.     char leer[50];
  127. } Modul_header;
  128.  
  129. /* Defines für Poti.type */
  130. #define H_POTI 0
  131. #define V_POTI 1
  132.  
  133. typedef struct
  134. {
  135.     char type;
  136.     char activ;
  137.     int  parent_index;
  138.     int  slider_index;
  139.     unsigned char position;
  140.     unsigned char obj_position;
  141. } Poti;
  142.  
  143. /* max number of sliders */
  144. #define POTI_ZAHL 12
  145.  
  146. typedef struct
  147. {
  148.     char l_butt;         /* switches output*/
  149.     char solo_butt; /* state of solo button */
  150.     int  in_left;        /* input left DSP-Variable */
  151.     int  in_right;  /* input right DSP-Variable */
  152.     int  out_left;    /* output left DSP-Variable */
  153.     int  out_right;    /* output right DSP-Variable */
  154.     Poti vol_poti;
  155.     Poti pan_poti;
  156.     Poti potis[POTI_ZAHL];
  157. } Modul_globals;
  158.